<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件通信-父传子（prop中的驼峰标识）</title>
</head>

<script src="../js/vue.js"></script>
<body>

<div id="app">
    <cpn :cinfo="info"></cpn>
</div>

</body>

<template id="cpn">
    <div>
        <h2>{{cinfo}}</h2>
    </div>
</template>


<script>
    const cpn = {
        template: '#cpn',
        props: {
            cinfo: {
                type: Object,
                required: true,
                default() {
                    return {}
                }
            }
        },
    };

    const vue = new Vue({
        'el': '#app',
        'data': {
            info: {
                name: 'qxf',
                age: 26
            }
        },
        'methods': {},
        components: {
            cpn
        }
    })
</script>
</html>